// 七牛云基础配置
const qiniu = require('qiniu')
const accessKey = 'Vl7pEPxgVivDNq-OyeYVoerARTpGFv9hKKcoIaqs'
const secretKey = '6Z1QIZVmfb02ONn9zoMknfq0hKbOyv9U9x-vyLJF'
let mac = new qiniu.auth.digest.Mac(accessKey, secretKey)

const options = {
  scope: 'yanwuhc'
}
const putPolicy = new qiniu.rs.PutPolicy(options)
const uploadToken = putPolicy.uploadToken(mac)
const config = new qiniu.conf.Config()
config.zone = qiniu.zone.Zone_z2

// 扩展配置
const basePath = 'photo/' // 七牛云存储照片路径文件夹
const baseUrl = 'http://qiniu.cdn.yanwuhc.cn/'

module.exports = {
  accessKey,
  secretKey,
  uploadToken,
  config,
  basePath,
  baseUrl
}